<template>
	<view>
		<view class="wp-step">
			<view class="item-step-1" v-for="(item,index) in stepList" :key="index">
				<view class="left">
					{{item.time}}
				</view>
				<view class="mid" @click.stop="clickChange(item,index)">
					<image class="circ" src="https://tingqishop.oss-cn-shanghai.aliyuncs.com/cdn/images/other/act-2.png" mode="widthFix" v-if="!item.isTrue"></image>
					<image class="circ" src="https://tingqishop.oss-cn-shanghai.aliyuncs.com/cdn/images/other/act-1.png" mode="widthFix" v-if="item.isTrue"></image>
					<view class="line" :class="[item.isTrue?'':'line-1']"></view>
				</view>
				<view class="right">
					<!-- <i>(已结清)</i> -->
					<text :style="{'color':item.isTrue?'':'#333333'}">{{item.AllPrice}}</text>
					<text>退回货款：{{item.returnMoney}}</text>
					<text>订单分润：{{item.orderFenMoney}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			};
		},
		props:{
			stepList:{
				type:Array,
				default(){
					return [
						{
                            time: '2020-6-24',
                            AllPrice: '50000000(已结清)',
                            returnMoney: '500000',
                            orderFenMoney:'500000',
                            isTrue: true
                        },
                        {
                            time: '2020-7-24',
                            AllPrice: '50000000(未结清)',
                            returnMoney: '500000',
                            orderFenMoney:'500000',
                            isTrue: false
                        },
                        {
                            time: '2020-7-24',
                            AllPrice: '50000000(未结清)',
                            returnMoney: '500000',
                            orderFenMoney:'500000',
                            isTrue: false
                        },
					]
				}
			}
		},
		methods:{
			clickChange(row,index){
				this.$emit('clickEvent',row)
			}
		}
	}
</script>

<style lang="scss" scoped>
	$normal-color: #CCCCCC;
	$active-color: #FD532D;
	.wp-step{
		width: 100%;
		background: #FFFFFF;
		display: flex;
		flex-direction: column;
		.item-step-1{
			width: 100%;
			height: 170rpx;
			display: flex;
			flex-direction: row;
			justify-content: flex-start;
			.left{
				flex: 0.6;
				padding-top: 12rpx;
				color: #333333;
				font-size: 24rpx;
			}
			.mid{
				width: 24rpx;
				padding: 0 30rpx 0 30rpx;
				position: relative;
				height: 170rpx;
				.circ{
					z-index: 10;
					top: 0rpx;
					position: relative;
					width: 24rpx;
					height: 24rpx;
					// background: $active-color;
					border-radius: 50%;
				}
				.circl-1{
					top: 10rpx;
					position: relative;
					width: 24rpx;
					height: 24rpx;
					background: $normal-color;
					border-radius: 50%;
					&::after{
						position: absolute;
						left: 50%;
						top: 50%;
						margin-top: -7rpx;
						margin-left: -7rpx;
						content: '';
						width: 14rpx;
						height: 14rpx;
						border-radius: 50%;
						background: #FFFFFF;
					}
				}
				.line{
					position: absolute;
					top: 30rpx;
					left: 50%;
					height: 160rpx;
					width: 2rpx;
					background: $active-color;
				}
				.line-1{
					position: absolute;
					top: 30rpx;
					left: 50%;
					height: 160rpx;
					width: 2rpx;
					background: $normal-color;
				}
			}
			.right{
				padding-top: 10rpx;
				padding-left: 50rpx;
				flex: 1;
				display: flex;
				flex-direction: column;
				text{
					font-size: 24rpx;
					color: #999999;
					&:first-child{
						font-size: 32rpx;
						color: #FD532D;
						i{
							font-style: normal;
						}
					}
					&:nth-child(2){
						padding-top: 10rpx;
					}
				}
			}
			&:last-child{
				.mid{
					.line{
						background: #FFFFFF;
					}
				}
			}
		}
	}
</style>
